<!DOCTYPE html>
<html lang="zh">
	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<meta http-equiv="X-UA-Compatible" content="ie=edge">
		<title>机构端</title>
        <script src="/Public/static/jquery-2.0.3.min.js"></script>
        <script src="/Public/static/layer/layer.js"></script>
        <link rel="stylesheet" href="__PUBLIC__/Home/css/reset.css">
        <link rel="stylesheet" href="__PUBLIC__/Home/css/style.css">
	</head>

	<body class="agency_box contentBox pos_rel dpflxr">
		<include file="head" />


		<!-- 2.垂直导航 -->
		<div class="navColumn">
			<a href="{:U('Mechanism/index')}" <if condition="$cur eq '信息设置'">class="navColumnItem actived dpflxr pos_rel"<else/>class="navColumnItem dpflxr pos_rel"</if> data-type='1'>
				<div class="lineColumn pos_abs"></div>
				<label for="">信息设置</label>
				<div class="rightArrow">
				</div>
			</a>
			<a href="{:U('Mechanism/department_manage')}" <if condition="$cur eq '部门管理'">class="navColumnItem actived dpflxr pos_rel"<else/>class="navColumnItem dpflxr pos_rel"</if> data-type='2'>
				<div class="lineColumn pos_abs"></div>
				<label for="">部门管理</label>
				<div class="rightArrow">
				</div>
			</a>
			<a href="{:U('Mechanism/staff')}" <if condition="$cur eq '员工管理'">class="navColumnItem actived dpflxr pos_rel"<else/>class="navColumnItem dpflxr pos_rel"</if> data-type='3'>
				<div class="lineColumn pos_abs"></div>
				<label for="">员工管理</label>
				<div class="rightArrow">
				</div>
			</a>
			<a href="{:U('Mechanism/role_manage')}" <if condition="$cur eq '权限管理'">class="navColumnItem actived dpflxr pos_rel"<else/>class="navColumnItem dpflxr pos_rel"</if> data-type='4'>
				<div class="lineColumn pos_abs"></div>
				<label for="">权限管理</label>
				<div class="rightArrow">
				</div>
			</a>
			<a href="{:U('Mechanism/punch_record')}" <if condition="$cur eq '打卡记录'">class="navColumnItem actived dpflxr pos_rel"<else/>class="navColumnItem dpflxr pos_rel"</if> data-type='5'>
				<div class="lineColumn pos_abs"></div>
				<label for="">打卡记录</label>
				<div class="rightArrow">
				</div>
			</a>
		</div>


		<!-- 3.垂直导航分类页面 -->
		<!-- 3.1 信息设置 -->
		<div class="contentArea tabPage actived">
			<div class="switchTab dpflxr">
				<a href="{:U('Mechanism/index')}" <if condition="$type eq 1"> class="switchItem dpflxc actived" <else />  class="switchItem dpflxc" </if>>
					<label for="">基本信息</label>
					<div class="tabLine"></div>
				</a>
				<a href="{:U('Mechanism/authentication_information')}" <if condition="$type eq 2"> class="switchItem dpflxc actived" <else />  class="switchItem dpflxc" </if>>
					<label for="">认证信息</label>
					<div class="tabLine"></div>
				</a>
				<a href="{:U('Mechanism/update_password')}" <if condition="$type eq 3"> class="switchItem dpflxc actived" <else />  class="switchItem dpflxc" </if>>
					<label for="">密码修改</label>
					<div class="tabLine"></div>
				</a>
			</div>

			

		
			<!-- 3.1.3 密码修改-->

			<div class="switchPage tabPageF card actived">
				<div class="dpflxr">
					<div class="contentItem entry dpflxr">
						<label for="" class="title">原密码：</label>
						<input type="password" name="password" class="inputBox" placeholder="请输入原密码"
							placeholder-style="font-size:16px;line-height:48px;color:#bfa;" />
					</div>
					<div class="contentItem entry dpflxr">
						<label for="" class="title">新密码：</label>
						<input type="password" name="new_password" class="inputBox" placeholder="请输入新密码"
							placeholder-style="font-size:16px;line-height:48px;color:#bfa;" />
					</div>
					<div class="contentItem entry dpflxr">
						<label for="" class="title">确认密码：</label>
						<input type="password" name="confirm_password" class="inputBox" placeholder="请重复输入新密码"
							placeholder-style="font-size:16px;line-height:48px;color:#bfa;" />
					</div>
					
				</div>
				
				
				<div class="ciBtn"><label>保存</label></div>
			</div>
		</div>

	

		
	</body>
</html>
<script type="text/javascript">
$("body").on('click','.ciBtn',function(){
	var password=$("input[name='password']").val();
	var new_password=$("input[name='new_password']").val();
	var confirm_password=$("input[name='confirm_password']").val();
	// alert(img);
	$.ajax({
		url: "{:U('Mechanism/save_password')}",
        type: "post",
        data: {password:password,new_password:new_password,confirm_password:confirm_password},
        dataType:"json",
        success: function (data) {
            if(data.result == 1){
            　　alert(data.msg);
    			var url = "{:U('Mechanism/update_password')}";
                location.href=url;

　　　　　　　}else{
				alert(data.msg);
				var url = "{:U('Mechanism/update_password')}";
	            location.href=url;

			}
        },
	})
})
</script>